package group.sicher.core.web.response;


import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

import java.io.Serializable;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class SicherResponse implements Serializable {

    public static final Integer SUCCESS_CODE = 200;

    private Integer errCode = SUCCESS_CODE;//returnCode
    private String errMsg;// 提示信息
    private Object data;// 数据信息


    public SicherResponse() {
    }

    public SicherResponse(int code) {
        this.errCode = code;
    }

    public SicherResponse(int code, Object data) {
        this.errCode = code;
        this.data = data;
    }

    public SicherResponse(int code, String message) {
        this.errCode = code;
        this.errMsg = message;
    }

    public SicherResponse(int code, String message, Object data) {
        this.errCode = code;
        this.errMsg = message;
        this.data = data;
    }

    public Integer getErrCode() {
        return errCode;
    }

    public void setErrCode(Integer errCode) {
        this.errCode = errCode;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

}
